package b.p.b;

import android.view.View;
import android.view.ViewPropertyAnimator;
import androidx.recyclerview.widget.RecyclerView.z;
import b.p.b.m.b;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Objects;

/* compiled from: DefaultItemAnimator */
public class e implements Runnable {
    public final /* synthetic */ ArrayList a;
    public final /* synthetic */ m b;

    public e(m mVar, ArrayList arrayList) {
        this.b = mVar;
        this.a = arrayList;
    }

    public void run() {
        Iterator it = this.a.iterator();
        while (it.hasNext()) {
            b bVar = (b) it.next();
            m mVar = this.b;
            z zVar = bVar.a;
            int i = bVar.b;
            int i2 = bVar.c;
            int i3 = bVar.d;
            int i4 = bVar.e;
            Objects.requireNonNull(mVar);
            View view = zVar.a;
            i3 -= i;
            i4 -= i2;
            if (i3 != 0) {
                view.animate().translationX(0.0f);
            }
            if (i4 != 0) {
                view.animate().translationY(0.0f);
            }
            ViewPropertyAnimator animate = view.animate();
            mVar.p.add(zVar);
            animate.setDuration(mVar.e).setListener(new j(mVar, zVar, i3, view, i4, animate)).start();
        }
        this.a.clear();
        this.b.m.remove(this.a);
    }
}
